package com.ikangtai.shecare.common.al;

import com.ikangtai.shecare.common.util.AppLog;

public class UserUnitDS {
	public int validCycleCount;
	public float averageMenstruationLength;
    public float menstruationLengthError;
    public float averageCycleLength;
    public float cycleLengthError;
    public float averageLuteumPhaseLength;
    public float averageOvulationDay;
    public int abnormalCaseAlert;

	public UserUnitDS(){
		this.validCycleCount = 0; // 第一次为0，其他情况由算法返回
		this.averageMenstruationLength = 5; //用户填写
		this.menstruationLengthError = 3; // 第一次为3，其他情况由算法返回
		this.averageCycleLength = 28; //用户填写
		this.cycleLengthError = 4; //误差，第一次为4，其他情况由算法返回
		this.averageLuteumPhaseLength = 14; //第一次为14，其他情况由算法返回
		this.averageOvulationDay = this.averageCycleLength - this.averageLuteumPhaseLength;
		this.abnormalCaseAlert = 0; // 第一次为0，其他情况由算法返回
	}

	public void setData(int validCycleCount,float averageMenstruationLength,float menstruationLengthError,
							float averageCycleLength,float cycleLengthError,float averageLuteumPhaseLength,
						float averageOvulationDay, int abnormalCaseAlert){
		this.validCycleCount = validCycleCount;
		this.averageMenstruationLength = averageMenstruationLength;
		this.menstruationLengthError = menstruationLengthError;
		this.averageCycleLength = averageCycleLength;
		this.cycleLengthError = cycleLengthError;
		this.averageLuteumPhaseLength = averageLuteumPhaseLength;
		this.averageOvulationDay = averageOvulationDay;
		this.abnormalCaseAlert = abnormalCaseAlert;
	}

	public void showLog(){
		AppLog.i("Algorithm UserUnitDS Data show --> validCycleCount:" + this.validCycleCount +
                ", averageMenstruationLength:" + this.averageMenstruationLength +
                ", menstruationLengthError:" + this.menstruationLengthError +
                ", averageCycleLength:" + this.averageCycleLength +
                ", cycleLengthError:" + this.cycleLengthError +
                ", averageLuteumPhaseLength:" + this.averageLuteumPhaseLength +
                ", averageOvulationDay:" + this.averageOvulationDay +
                ", abnormalCaseAlert:" + this.abnormalCaseAlert);
	}
	
}
